#ifndef __SUBSYSTEM_EXPLOSIONS_H__
#define __SUBSYSTEM_EXPLOSIONS_H__

#include "Subsystem.hpp"


namespace PocketSurvival
{
    struct ComponentPlayer;

    class SubsystemExplosions : public Subsystem
    {
    public:

        virtual bool tryExplodeBlock(int32_t x, int32_t y, int32_t z, int32_t value);
        virtual void addExplosion(int32_t x, int32_t y, int32_t z, float pressure, bool isIncendiary); 

    public:
        SubsystemExplosions();

        virtual void update(float dt) override;
        virtual void load(const nlohmann::json& json) override;
        virtual void save(nlohmann::json& json) override;
        virtual void saveToMsgJson(nlohmann::json &jsonData) override;

        virtual const std::string& getName() const override;
        virtual SubUpdateType getUpdateType() override;
    };

    inline SubsystemExplosions::SubsystemExplosions() {}
}

#endif